package com.yan.controller;


import com.yan.service.HelloService;
import com.yan.service.SchedualServiceHi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by yanl_ on 2018/4/23.
 */
@RestController
public class HelloControler {

    @Autowired
    HelloService helloService;

    @RequestMapping(value = "/hh")
    public String hi(@RequestParam String name) {
        return helloService.hiService(name);
    }


    @Autowired
    SchedualServiceHi schedualServiceHi;

    @RequestMapping(value = "/hs", method = RequestMethod.GET)
    public String sayHi(@RequestParam String name) {
        return schedualServiceHi.sayHiFromClientOne(name);
    }

}